home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / speedcal / speed1.frm < prev    next >
Text File  |  1995-05-08  |  4KB  |  162 lines

  1. VERSION 2.00
  2. Begin Form Speedcal1 
  3.    Caption         =   "Speed Calculator"
  4.    ClientHeight    =   4755
  5.    ClientLeft      =   990
  6.    ClientTop       =   1440
  7.    ClientWidth     =   10875
  8.    Height          =   5160
  9.    Left            =   930
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    Picture         =   SPEED1.FRX:0000
  13.    ScaleHeight     =   4755
  14.    ScaleWidth      =   10875
  15.    Top             =   1095
  16.    Width           =   10995
  17.    Begin CommandButton Quit 
  18.       Caption         =   "Quit"
  19.       Height          =   495
  20.       Left            =   7440
  21.       TabIndex        =   0
  22.       Top             =   4080
  23.       Width           =   1215
  24.    End
  25.    Begin Frame Frame1 
  26.       Caption         =   "Top Speed"
  27.       Height          =   1095
  28.       Left            =   360
  29.       TabIndex        =   9
  30.       Top             =   3240
  31.       Width           =   3135
  32.       Begin TextBox Speed 
  33.          Height          =   495
  34.          Left            =   480
  35.          TabIndex        =   10
  36.          Text            =   " "
  37.          Top             =   480
  38.          Width           =   1095
  39.       End
  40.       Begin Label Label4 
  41.          Caption         =   "MPH"
  42.          FontBold        =   -1  'True
  43.          FontItalic      =   0   'False
  44.          FontName        =   "MS Sans Serif"
  45.          FontSize        =   18
  46.          FontStrikethru  =   0   'False
  47.          FontUnderline   =   0   'False
  48.          Height          =   495
  49.          Left            =   1680
  50.          TabIndex        =   11
  51.          Top             =   480
  52.          Width           =   975
  53.       End
  54.    End
  55.    Begin CommandButton Command2 
  56.       Caption         =   "Calculate"
  57.       Height          =   495
  58.       Left            =   1920
  59.       TabIndex        =   12
  60.       Top             =   2400
  61.       Width           =   1455
  62.    End
  63.    Begin TextBox FinalDrive 
  64.       Height          =   375
  65.       Left            =   1920
  66.       TabIndex        =   5
  67.       Text            =   " "
  68.       Top             =   1560
  69.       Width           =   855
  70.    End
  71.    Begin TextBox Tire 
  72.       Height          =   375
  73.       Left            =   1920
  74.       TabIndex        =   4
  75.       Text            =   " "
  76.       Top             =   1080
  77.       Width           =   855
  78.    End
  79.    Begin TextBox RPM 
  80.       Height          =   375
  81.       Left            =   1920
  82.       TabIndex        =   3
  83.       Text            =   " "
  84.       Top             =   480
  85.       Width           =   855
  86.    End
  87.    Begin ListBox GroupList 
  88.       Height          =   1590
  89.       Left            =   600
  90.       TabIndex        =   1
  91.       Top             =   480
  92.       Width           =   855
  93.    End
  94.    Begin Label Label3 
  95.       Caption         =   "Final Drive"
  96.       Height          =   255
  97.       Left            =   2880
  98.       TabIndex        =   8
  99.       Top             =   1560
  100.       Width           =   975
  101.    End
  102.    Begin Label TireSize 
  103.       Caption         =   "Tire Size"
  104.       Height          =   255
  105.       Left            =   2760
  106.       TabIndex        =   7
  107.       Top             =   1080
  108.       Width           =   1095
  109.    End
  110.    Begin Label Label2 
  111.       Caption         =   "RPM"
  112.       Height          =   255
  113.       Left            =   2880
  114.       TabIndex        =   6
  115.       Top             =   600
  116.       Width           =   975
  117.    End
  118.    Begin Label Label1 
  119.       Caption         =   "Axle Choice"
  120.       Height          =   255
  121.       Left            =   360
  122.       TabIndex        =   2
  123.       Top             =   120
  124.       Width           =   1335
  125.    End
  126. End
  127. Sub Command1_Click ()
  128.  GroupList.Show
  129. End Sub
  130.  
  131. Sub Command2_Click ()
  132.  Gear = Val(GroupList.text)
  133.  RPM1 = Val(RPM.text)
  134.  Drive = Val(Finaldrive.text)
  135.  Tiresz = Val(tire.text)
  136. Speed1 = Tiresz * RPM1 * (1 / Gear)
  137. Speed2 = 336 * Drive
  138. speedres = Speed1 / Speed2
  139. Speed.text = Format$(speedres, "000")
  140.  
  141. End Sub
  142.  
  143. Sub Form_Load ()
  144. GroupList.AddItem "2.73"
  145. GroupList.AddItem "3.00"
  146. GroupList.AddItem "3.25"
  147. GroupList.AddItem "3.55"
  148. GroupList.AddItem "3.73"
  149. GroupList.AddItem "3.89"
  150. GroupList.AddItem "4.11"
  151. GroupList.AddItem "4.56"
  152. End Sub
  153.  
  154. Sub Quit_Click ()
  155.  End
  156. End Sub
  157.  
  158. Sub Start_Click ()
  159.  GroupList.Show
  160. End Sub
  161.  
  162.